package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xmy.cultivate.entity.StudentAudio;
import com.xmy.cultivate.mapper.StudentAudioMapper;
import com.xmy.cultivate.service.IStudentAudioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentAudioServiceImpl extends ServiceImpl<StudentAudioMapper, StudentAudio> implements IStudentAudioService {

    @Autowired
    StudentAudioMapper studentAudioMapper;

    @Override
    public List<StudentAudio> getListForStudentId(Long studentId){
        QueryWrapper<StudentAudio> studentAudioQueryWrapper = new QueryWrapper<>();
        studentAudioQueryWrapper.eq("student_id",studentId);

        List<StudentAudio> studentAudioList = studentAudioMapper.selectList(studentAudioQueryWrapper);
        return studentAudioList;
    }
}
